<!-- 封装toast组件，以插件的方式 -->
<template>
    <div class="toast" v-show="isShow">
        {{message}}
    </div>
</template>

<script>
    export default {
        name: 'Toast',
        props: {
            message: {
                type: String,
                default: ''
            },
            isShow: {
                type: Boolean,
                default: false
            }
        },
        methods: {
        }
    }
</script>

<style scoped>
    .toast {
        position: fixed;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        padding: 10px 20px;
        border-radius: 8px;
        background-color: rgba(0, 0, 0, 0.8);
        color: white;
        z-index: 99;
    }
</style>